﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.Text
{
    public static class StringExtentions
    {
        public static string FormatWith(this string text, params dynamic[] args)
        {
            return string.Format(CultureInfo.CurrentCulture, text, args);
        }

        public static string Append(this string text, string newValue)
        {
            return "{0}{1}".FormatWith(new string[] { text, newValue });
        }

        public static string Append(this string text, Char newValue)
        {
            return "{0}{1}".FormatWith(new string[] { text, new string(new char[] { newValue }) });
        }

        public static string AppendWith(this string text, char newchar, string newValue)
        {
            return text.Append(newchar).Append(newValue);
        }

        public static string AppendWithSemicolon(this string text, string newValue)
        {
            return text.AppendWith(';', newValue);
        }

        public static string AppendWithSpace(this string text, string newValue)
        {
            return text.AppendWith(' ', newValue);
        }
    }
}
